<?php

namespace App\Models;

use Illuminate\Database\Eloquent\SoftDeletes;

class AgentWebsiteLetter extends Base
{
    use SoftDeletes;

    /**
     * 范围: 全部
     */
    const RANGE_TYPE_ALL = 1;

    /**
     * 范围: 指定人员
     */
    const RANGE_TYPE_DESIGNATED = 2;

    /**
     * 状态: 未读
     */
    const STATUS_UNREAD = 1;

    /**
     * 状态: 已读
     */
    const STATUS_HAVE_READ = 2;

    protected $table = 'agent_website_letter';

    public function websiteLetter()
    {
        return $this->belongsTo(WebsiteLetter::class);
    }

    public function agent()
    {
        return $this->belongsTo(Agent::class);
    }
}
